<!--#include("header.html")-->
<!--%import("js/toggle.js")-->
<form class="new_issue_form pxeWrite" action="{Context::getRequestUri()}" method="post" onsubmit="return procFilter(this, window.insert);">
        <input type="hidden" name="vid" value="{$vid}" />
		<input type="hidden" name="mid" value="{$mid}" />
		<input type="hidden" name="content" value="{$oIssue->getContentText()}" />
		<input type="hidden" name="document_srl" value="{$document_srl}" />
    <div class="issue_box">
	<h4>{$lang->project_menus['dispIssuetrackerNewIssue']}</h4>
    <dl class="clearfix">
		<dt>
			<label for="title" >{$lang->title}</label></dt>
			    <dd class="dd_inline"><span><input name="title" type="text" class="ipt_title" id="title" value="{htmlspecialchars($oIssue->getTitleText())}"/></span></dd>
		<!--@if(count($extra_keys))-->
		<!--@foreach($extra_keys as $key => $val)-->
		<dt><label for="{$key}" style="visibility:hidden;">{$val->name} <!--@if($val->is_required=='Y')--><em>*</em><!--@end--></label></dt>
			<dd class="dd_inline">
			    <!--@if($val->type == 'txt')-->
			    <span>
			    <!--@end-->
			    {$val->getFormHTML()}
			    <!--@if($val->type == 'txt')-->
			    <span>
			    <!--@end-->
			</dd>
		<!--@end-->
		<!--@end-->

		<!--@if(!$oIssue->isExists())-->
		<!--@if($grant->commiter)-->
		<!--@if(count($project->milestones) > 0)-->
		<dt><label for="inputMilestone">{$lang->milestone}</label></dt>
			<dd class="dd_inline">
				<select name="milestone_srl" class="sel_goal" id="inputMilestone">
    				<option value="0">{$lang->milestone}</option>
    				<!--@foreach($project->milestones as $val)-->
    				<!--@if($val->is_completed != 'Y')-->
    				<option value="{$val->milestone_srl}" <!--@if($val->is_default == 'Y')-->selected="selected"<!--@end-->>{$val->title}</option>
    				<!--@endif-->
    				<!--@end-->
				</select>
			</dd>
		<!--@endif-->
		<!--@if(count($project->priorities) > 0)-->
			<dt><label for="inputPriority">{$lang->priority}</label></dt>
			<dd class="dd_inline">
				<select name="priority_srl" class="sel_priority" id="inputPriority">
				<option value="">{$lang->priority}</option>
				<!--@foreach($project->priorities as $key => $val)-->
					<option value="{$val->priority_srl}" <!--@if($val->is_default=='Y')-->selected="selected"<!--@end-->>{$val->title}</option>
					<!--@end-->
				</select>
			</dd>
		<!--@endif-->
		<!--@endif-->
		<!--@if($grant->commiter && count($project->packages))-->
			<dt><label for="inputPackage">{$lang->occured_version}</label></dt>
			<dd class="dd_inline">
				<select name="package_srl" class="sel_priority" id="inputPackage" onchange="showRelease(this,this.form);">
					<option value="">{$lang->package}</option>
					<!--@foreach($project->packages as $key => $val)-->
					<option value="{$val->package_srl}" <!--@if($val->package_srl==$oIssue->get('package_srl'))-->selected="selected"<!--@end-->>{$val->title}</option>
					<!--@end-->
				</select>
			</dd>
			<dd class="dd_inline">
				<select name="release_srl" class="sel_release" >
					<option value="">{$lang->release}</option>
					<!--@foreach($project->packages as $key => $val)-->

					<!--@if($val->package_srl==$oIssue->get('package_srl'))-->
						<!--@foreach($project->releases as $k => $v)-->
						<!--@if($val->package_srl == $v->package_srl)-->
						<option value="{$v->release_srl}" <!--@if($v->release_srl==$oIssue->get('occured_version_srl'))-->selected="selected"<!--@end-->>{$v->title}</option>
						<!--@end-->
						<!--@end-->
					<!--@end-->
					<!--@end-->
				</select>
			</dd>
		<!--@endif-->
		<!--@if(count($project->types) > 0)-->
			<dt><label for="inputType">{$lang->type}</label></dt>
			<dd class="dd_inline">
				<select name="type_srl" id="inputType">
					<option value="">{$lang->type}</option>
					<!--@foreach($project->types as $key => $val)-->
					<option value="{$val->type_srl}" <!--@if($val->is_default=='Y')-->selected="selected"<!--@end-->>{$val->title}</option>
					<!--@end-->
				</select>
			</dd>
		<!--@endif-->
		<!--@if(count($project->components) > 0)-->
			<dt><label for="inputComponent">{$lang->component}</label></dt>
			<dd class="dd_inline">
				<select name="component_srl" id="inputComponent">
					<option value="">{$lang->component}</option>
					<!--@foreach($project->components as $key => $val)-->
					<option value="{$val->component_srl}" <!--@if($val->is_default=='Y')-->selected="selected"<!--@end-->>{$val->title}</option>
					<!--@end-->
				</select>
			</dd>
		<!--@endif-->
		<!--@endif-->
		    <dt><label for="content">Description</label></dt>
		    <dd class="dd_ta"><div class="editor">{$oIssue->getEditor()}</div></dd>

		    <div class="editorOption">
			<!--@if($grant->manager)-->
				<input type="hidden" name="title_bold" id="title_bold" value="Y" <!--@if($oIssue->get('title_bold')=='Y')--> value="Y"<!--@end-->/>
				<input type="hidden" name="is_notice" <!--@if($oIssue->isNotice())--> value="Y"<!--@end-->/>
				<input type="hidden" name="lock_comment" <!--@if($oIssue->isLocked())--> value="Y"<!--@end--> id="lock_comment" />
			<!--@endif-->
				<input type="hidden" name="is_secret" <!--@if($oIssue->isSecret())--> value="Y"<!--@end--> id="is_secret" />
				<input type="hidden" name="allow_comment" <!--@if($oIssue->allowComment())--> value="Y"<!--@end--> id="allow_comment" />
				<input type="hidden" name="allow_trackback" <!--@if($oIssue->allowTrackback())--> value="Y"<!--@end--> id="allow_trackback" />
				<!--@if($is_logged)-->
				<input type="hidden" name="notify_message" <!--@if($oIssue->useNotify())--> value="Y"<!--@end--> id="notify_message" />
				<!--@end-->
			</div>
		<!--@if(!$is_logged)-->
		<div class="guest">
			<span class="item"><label for="author" class="iLabel">{$lang->writer}</label><input name="nick_name" type="text" id="author" class="iText" title="{$lang->writer}" /></span>
			<span class="item"><label for="password" class="iLabel">{$lang->password}</label><input name="password" type="password" id="password" class="iText" title="{$lang->password}" /></span>
			<span class="item"><label for="email" class="iLabel">{$lang->email_address}</label><input name="email_address" type="text" id="email" class="iText" title="{$lang->email_address}" /></span>
			<span class="item"><label for="site" class="iLabel">{$lang->homepage}</label><input name="homepage" type="text" id="site" class="iText" title="{$lang->homepage}" /></span>
		</div>
		<!--@end-->
    </dl>

    <input type="submit" value="Submit" class="sbmt"/>
    </div>
</form>
<form action="{Context::getRequestUri()}" method="get" style="display:none;">
<input type="hidden" name="vid" value="{$vid}" />
<!--@foreach($project->packages as $key => $val)-->
<select id="release_{$val->package_srl}">
    <option value="">{$lang->release}</option>
    <!--@foreach($project->releases as $k => $v)-->
    <!--@if($val->package_srl == $v->package_srl)-->
    <option value="{$v->release_srl}" <!--@if($v->release_srl==$release_srl)-->selected="selected"<!--@end-->>{$v->title}</option>
    <!--@end-->
    <!--@end-->
</select>
<!--@end-->
</form>
<script type="text/javascript">
    package = new Array();
    <!--@foreach($project->releases as $k => $v)-->
    if(!package['{$v->package_srl}']) package['{$v->package_srl}'] = new Array();
    package['{$v->package_srl}'][package['{$v->package_srl}'].length] = new Array('{$v->release_srl}','{$v->title}');
    <!--@end-->
</script>
<!--#include("footer.html")-->
